﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true"
    CodeBehind="Editpass.aspx.cs" Inherits="Project_Udrinkwater.Empoyee_Management.Editpass" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="HeaderText">
        แก้ไขรหัสผ่าน :
        <%=User.Identity.Name%></div>
    <table style="width: 100%;">
        <tr>
            <td style="width: 291px; text-align: right;">
                รหัสผ่านเดิม :
            </td>
            <td style="width: 217px">
                <dx:ASPxTextBox ID="tbCurrentPassword" runat="server" Password="true" Width="200px">
                    <ValidationSettings ValidationGroup="ChangeUserPasswordValidationGroup">
                        <RequiredField ErrorText="Old Password is required." IsRequired="true" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
            <td style="width: 533px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="height: 25px; width: 291px; text-align: right;">
                รหัสผ่านใหม่ :
            </td>
            <td style="height: 25px; width: 217px">
                <dx:ASPxTextBox ID="tbPassword" ClientInstanceName="Password" Password="true" runat="server"
                    Width="200px">
                    <ValidationSettings ValidationGroup="ChangeUserPasswordValidationGroup">
                        <RequiredField ErrorText="Password is required." IsRequired="true" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
            <td style="height: 25px; width: 533px">
                &nbsp;
            </td>
            <td style="height: 25px">
            </td>
        </tr>
        <tr>
            <td style="height: 23px; width: 291px; text-align: right;">
                ยืนยันรหัสผ่าน :
            </td>
            <td style="height: 23px; width: 217px">
                <dx:ASPxTextBox ID="tbConfirmPassword" Password="true" runat="server" Width="200px">
                    <ValidationSettings ValidationGroup="ChangeUserPasswordValidationGroup">
                        <RequiredField ErrorText="Confirm Password is required." IsRequired="true" />
                    </ValidationSettings>
                    <ClientSideEvents Validation="function(s, e) {
			var originalPasswd = Password.GetText();
			var currentPasswd = s.GetText();
			e.isValid = (originalPasswd  == currentPasswd );
			e.errorText = 'The Password and Confirmation Password must match.';
		}" />
                </dx:ASPxTextBox>
            </td>
            <td style="height: 23px; width: 533px">
                &nbsp;
            </td>
            <td style="height: 23px">
            </td>
        </tr>
        <tr>
            <td style="height: 23px; width: 291px; text-align: right;">
                &nbsp;
            </td>
            <td style="height: 23px; width: 217px">
                <asp:Label ID="Msg" runat="server"></asp:Label>
            </td>
            <td style="height: 23px; width: 533px">
                &nbsp;
            </td>
            <td style="height: 23px">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 291px">
                &nbsp;
            </td>
            <td style="width: 217px">
                <table style="width: 100%">
                    <tr>
                        <td>
                            <dx:ASPxButton ID="bt_Edit" runat="server" Text="บันทึกการแก้ไข" Theme="Office2003Blue" ValidationGroup="ChangeUserPasswordValidationGroup"
                                OnClick="bt_Edit_Click">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
            <td style="width: 533px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 291px">
                &nbsp;
            </td>
            <td style="width: 217px">
                &nbsp;
            </td>
            <td style="width: 533px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
